@extends('layouts.admin')
@section('content')
        <!--面包屑导航 开始-->
<div class="crumb_warp">
    <!--<i class="fa fa-bell"></i> 欢迎使用登陆网站后台，建站的首选工具。-->
    <i class="fa fa-home"></i> <a href="{{ url('admin/info') }}">首页</a> &raquo; 管理员添加
</div>
<!--面包屑导航 结束-->

<!--结果集标题与导航组件 开始-->
<div class="result_wrap">
    <div class="result_title">
        <h3>快捷操作</h3>
    </div>
    <div class="result_content">
        <div class="short_wrap">
            <a href="{{ url('admin/manager/create') }}"><i class="fa fa-plus"></i>管理员添加</a>
            <a href="{{ url('admin/manager') }}"><i class="fa fa-fw fa-list-ul"></i>管理员列表</a>
        </div>
    </div>
</div>
<!--结果集标题与导航组件 结束-->

@include('flash::message')

<div class="result_wrap">
    <form action="{{ url('/admin/manager/'.$data->id) }}" method="post">
        <input type="hidden" name="_method" value="PUT">
        {{ csrf_field() }}
        <table class="add_tab">
            <tbody>
            <tr>
                <th><i class="require">*</i>管理员名称：</th>
                <td>
                    <input type="text" name="name" placeholder="管理员名称" size="40" value="{{ $data->name }}">
                    <span><i class="fa fa-exclamation-circle yellow"></i>管理员的姓名</span>
                    @if($errors->has('name'))
                        <p class="colorRed">{{ $errors->first('name') }}</p>
                    @endif
                </td>
            </tr>
            <tr>
                <th><i class="require">*</i>管理员用户名：</th>
                <td>
                    <input type="text" name="username" placeholder="管理员用户名" size="40" onkeyup="this.value=this.value.replace(/[^a-zA-Z]+/g, '');" maxlength="16" value="{{ $data->username }}">
                    <span><i class="fa fa-exclamation-circle yellow"></i>管理员登录后台的名称，只能为英文</span>
                    @if($errors->has('username'))
                        <p class="colorRed">{{ $errors->first('username') }}</p>
                    @endif
                </td>
            </tr>
            <tr>
                <th><i class="require">*</i>管理员邮箱：</th>
                <td>
                    <input type="text" name="email" placeholder="管理员邮箱" size="40" value="{{ $data->email }}">
                    <span><i class="fa fa-exclamation-circle yellow"></i>管理员的邮箱</span>
                    @if($errors->has('email'))
                        <p class="colorRed">{{ $errors->first('email') }}</p>
                    @endif
                </td>
            </tr>
            <tr>
                <th>管理员密码：</th>
                <td>
                    <input type="password" name="password" placeholder="管理员密码" size="40" value="{{ old('password') }}">
                    <span><i class="fa fa-exclamation-circle yellow"></i> 新密码6-20位</span>
                    @if($errors->has('password'))
                        <p class="colorRed">{{ $errors->first('password') }}</p>
                    @endif
                </td>
            </tr>
            <tr>
                <th>确认密码：</th>
                <td>
                    <input type="password" name="password_confirmation" placeholder="确认密码" size="40">
                    <span><i class="fa fa-exclamation-circle yellow"></i>再次输入密码</span>
                    @if($errors->has('password_confirmation'))
                        <p class="colorRed">{{ $errors->first('password_confirmation') }}</p>
                    @endif
                </td>
            </tr>
            <tr>
                <th></th>
                <td>
                    <input type="submit" value="提交">
                    <input type="button" class="back" onclick="history.go(-1)" value="返回">
                </td>
            </tr>
            </tbody>
        </table>

    </form>
</div>
@endsection
<style type="text/css">
.colorRed{ color:red; }
</style>